package com.jzy.gulimall.ware.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jzy.common.to.SkuHasStockRespVo;
import com.jzy.common.to.mq.OrderTo;
import com.jzy.common.to.mq.StockLockTo;
import com.jzy.common.utils.PageUtils;
import com.jzy.gulimall.ware.entity.WareSkuEntity;
import com.jzy.gulimall.ware.vo.WareSkuLockVo;

import java.util.List;
import java.util.Map;

/**
 * 商品库存
 *
 * @author jzy
 * @email 1802511725@qq.com
 * @date 2020-07-12 08:58:54
 */
public interface WareSkuService extends IService<WareSkuEntity> {

    PageUtils queryPage(Map<String, Object> params);

    PageUtils queryPageByCondition(Map<String, Object> params);

    void addStock(Long skuId, Long wareId, Integer skuNum);

    List<SkuHasStockRespVo> getSkuHasStock(List<Long> skuIds);

    void lockStock(WareSkuLockVo wareSkuLockVo);

    void unLockStock(StockLockTo stockLockTo);

    void unLockStock(OrderTo orderTo);
}

